p = input().split()
r = int(input())
cout = 0
for i in range(len(p)):
    if r + 30 >= int(p[i]):
        cout += 1
print(cout)
